package com.hzdh.account.commom.enums;

import lombok.Getter;

@Getter
public enum ExpressCompanyEnums {

	EMS("EMS", "中国EMS"),
	SF("SF", "顺丰速运"),
	ZT("ZT", "中通快递"),
	YT("YT", "圆通快递"),
	ST("ST", "申通快递"),
	ZJS("ZJS", "宅急送快递"),
	YD("YD", "韵达快递"),
	QT("QT", "其他");
	
	private String code;
	
	private String name;

	ExpressCompanyEnums(String code, String name) {
		this.code = code;
		this.name = name;
	}
	
	/**
	 * 根据code获取name
	 * @param code
	 * @return
	 */
	public static String getName(String code) {
		for (ExpressCompanyEnums te : ExpressCompanyEnums.values()) {
			if (code.equalsIgnoreCase(te.getCode()))
				return te.getCode();
			}
		return null;
	}
	
}
